// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_IMPORT_LOCATION
// * CreateDate    : 2011/8/16 10:16:40
// * Creater       : CodeSmith
// * LastChangeDate: 2011/8/16 10:16:40
// * LastChanger   : 2011/8/16 10:16:40
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Suzsoft.Smart.Data;
using ESOL.Common.Entity;

namespace ESOL.Business.Inv
{
/// <summary>
    /// InvImportLocation
    /// </summary>
    public partial class InvImportLocationBs
    {
        #region GetByID
        /// <summary>
        /// Get Entity
        /// </summary>
        /// <param name="objInvImportLocationEntity">Entity</param>
        /// <returns>Entity</returns>
        public static InvImportLocationEntity GetInvImportLocation(InvImportLocationEntity objInvImportLocationEntity)
        {
            return DataAccess.SelectSingle<InvImportLocationEntity>(objInvImportLocationEntity);
        }

        public static InvImportLocationEntity GetByImpItemID(string ImpItemID)
        {
            if (string.IsNullOrEmpty(ImpItemID))
                return null;
            InvImportLocationEntity entity = new InvImportLocationEntity();
            entity.ImportItemId = ImpItemID;
            return DataAccess.SelectSingle<InvImportLocationEntity>(entity);
        }
        #endregion


        #region Insert
        /// <summary>
        /// Insert Data
        /// </summary>
        /// <param name="objInvImportLocationEntity">Entity</param>
        /// <returns>true Insert Succeed; false Insert Fail</returns>
        public static bool InsertInvImportLocation(InvImportLocationEntity objInvImportLocationEntity)
        {
            return DataAccess.Insert(objInvImportLocationEntity);
        }

        public static bool InsertInvImportLocation(List<InvImportLocationEntity> objInvImportLocationEntityList)
        {
            return DataAccess.Insert(objInvImportLocationEntityList);
        }
        #endregion


        #region Update
        /// <summary>
        /// Update Data
        /// </summary>
        /// <param name="objInvImportLocationEntity">Entity</param>
        /// <returns>true Update Succeed; false Update Fail</returns>
        public static bool UpdateInvImportLocation(InvImportLocationEntity objInvImportLocationEntity)
        {
            return DataAccess.Update(objInvImportLocationEntity);
        }

        public static bool UpdateInvImportLocation(List<InvImportLocationEntity> objInvImportLocationEntityList)
        {
            return DataAccess.Update<InvImportLocationEntity>(objInvImportLocationEntityList);
        }
        #endregion


        #region Delete
        /// <summary>
        /// Delete Data
        /// </summary>
        /// <param name="objInvImportLocationEntity">Entity</param>
        /// <returns>true Delete Succeed; false Delete Fail</returns>
        public static bool DeleteInvImportLocation(InvImportLocationEntity objInvImportLocationEntity)
        {
            return DataAccess.Delete(objInvImportLocationEntity);
        }

        public static bool DeleteInvImportLocation(List<InvImportLocationEntity> objInvImportLocationEntityList)
        {
            return DataAccess.Delete<InvImportLocationEntity>(objInvImportLocationEntityList);
        }
        #endregion


        #region GetAll
        /// <summary>
        /// Get All Data
        /// </summary>
        /// <returns>Back All Data<returns>
        public static DataSet GetInvImportLocationAll()
        {
            return DataAccess.SelectAllDataSet<InvImportLocationEntity>();
        }
        /// <summary>
        /// Get All Data List
        /// </summary>
        /// <returns>Back All Data List<returns>
        public static List<InvImportLocationEntity> GetInvImportLocationAllList()
        {
            return DataAccess.SelectAll<InvImportLocationEntity>();
        }
        #endregion
	}
	
	
}	

